package org.lds.hotkey.worker.remote.util;

import org.lds.hotkey.common.model.dto.ResultDTO;
import org.lds.hotkey.common.util.RestUtil;
import org.lds.hotkey.worker.remote.model.ReceiveRuleModelRequest;
import org.springframework.core.ParameterizedTypeReference;

public class WorkerClient {

    public static ResultDTO receiveRuleModel(String address, ReceiveRuleModelRequest request) {
        String url = "http://" + address + "/api/remote/rule-model/receive";
        return RestUtil.post(url, request, new ParameterizedTypeReference<ResultDTO>() {});
    }

}
